home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Celestin Apprentice 5
/
Apprentice-Release5.iso
/
Environments
/
RAMSES 2.2
/
RAMSES 2.2 Extras
/
DMBaseExtra
/
DMHeapWatch.DEF
< prev
next >
Wrap
Text File
|
1996-06-21
|
2KB
|
69 lines
DEFINITION MODULE DMHeapWatch;
(*******************************************************************
Module DMHeapWatch DM_V2.2
Copyright ©1989 by Andreas Fischlin and Swiss
Federal Institute of Technology Zürich ETHZ
Version written for:
'Dialog Machine' DM_V2.2 (User interface)
MacMETH_V3.2 (1-Pass Modula-2 implementation)
Purpose Watches allocation and deallocation of heap blocks
during program execution. If not all heap blocks
are returned by the program at its end, a warning
message will be displayed; it shows which allocation
resp. deallocation routines may have not have returned
memory
Remarks Needs module DMDebugHelp
Programming
• Design
A. Fischlin 02/02/90
• Implementation
A. Fischlin 02/02/90
Swiss Federal Institute of Technology Zurich ETHZ
Department of Environmental Sciences
Systems Ecology Group
ETH-Zentrum
CH-8092 Zurich
Switzerland
Last revision of definition: 05/11/90 af
*******************************************************************)
FROM SYSTEM IMPORT ADDRESS;
CONST
maxBlocks = 15;
TYPE
AllocInfo = PROCEDURE ( ADDRESS, ADDRESS, LONGINT, INTEGER );
(* pBefore, pAfter, size, level *)
DeallocInfo = PROCEDURE ( ADDRESS, ADDRESS, INTEGER );
(* pBefore, pAfter, level *)
VAR
ptrCount, handleCount, windowCount, TECount, controlCount,
menuCount, dialogCount: INTEGER;
showLevels, debugProc: PROCEDURE ( ARRAY OF CHAR , INTEGER, LONGINT);
blockSizes: ARRAY [0..maxBlocks] OF LONGINT; (* report if a heap
block of the given
size is encountered
in an allocate or
deallocate statement *)
allocInfoProc : AllocInfo;
deallocInfoProc: DeallocInfo;
END DMHeapWatch.